package com.baizhi.wd.action;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class FormAction extends HttpServlet {
	public void service(HttpServletRequest request,HttpServletResponse response) throws IOException{
		try{
		request.setCharacterEncoding("utf-8");
		String content = request.getParameter("content");
		request.setCharacterEncoding("utf-8");
		request.setAttribute("content", content);
		RequestDispatcher rd = request.getRequestDispatcher("/formview");
		rd.forward(request, response);
		}catch(Exception e){
			response.sendRedirect("/telbook_2/catchError.html");
			e.printStackTrace();
			}
	}
}
